package com.cmnit.analysis.application

import com.cmnit.analysis.common.TApplication
import com.cmnit.analysis.controller.{GbSectionDicController, GbSectionOwnerDicController, GbTollLaneDicController, GbTollPlazaDicController, GbTollPointDicController, GbTollRoadDicController, GbTollStationDicController, GbVerticalSectionDicController}
import org.apache.log4j.Logger


object Application extends TApplication {
  val logger: Logger = Logger.getLogger(this.getClass)
  private val gbSectionOwnerDicController = new GbSectionOwnerDicController
  private val gbTollRoadDicController = new GbTollRoadDicController
  private val gbSectionDicController = new GbSectionDicController
  private val gbTollStationDicController = new GbTollStationDicController
  private val gbTollPlazaDicController = new GbTollPlazaDicController
  private val gbTollLaneDicController = new GbTollLaneDicController
  private val gbVerticalSectionDicController = new GbVerticalSectionDicController
  private val gbTollPointDicController = new GbTollPointDicController

  def run(): Unit = {
    start("hive2mysql") {
      // 收费公路业主字典数据
      gbSectionOwnerDicController.controller()
      // 收费公路字典数据
      gbTollRoadDicController.controller()
      // 收费路段字典数据
      gbSectionDicController.controller()
      // 收费站字典数据
      gbTollStationDicController.controller()
      // 收费广场字典数据
      gbTollPlazaDicController.controller()
      // 收费车道字典数据
      gbTollLaneDicController.controller()
      // 收费单元字典数据
      gbVerticalSectionDicController.controller()
      // 收费门架字典数据
      gbTollPointDicController.controller()
    }
  }
}
